data("instacart")

Column

Chart A

instacart |> 
  filter(department == "dairy eggs") |> 
  plot_ly(
    x = ~ order_hour_of_day, y = ~ order_dow,
    type = "scatter", mode = "markers", alpha = 0.5
  )

Column

Chart B

instacart |> 
  group_by(department) |> 
  summarize(orders = n_distinct(order_id)) |> 
  plot_ly(
    x = ~orders, y = ~ fct_reorder(department, orders),
    type = "bar"
  )

Chart C

instacart |> 
  mutate(
    department = fct_reorder(department, days_since_prior_order)) |> 
  plot_ly(x = ~ department, y = ~ days_since_prior_order, color = ~ department,
          type = "box")
## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors
## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors